import request from '@/utils/request'
import Qs from 'qs'

// 添加个人基本信息
export const addBaseInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addBaseInfo',
    data: Qs.stringify(data)
  })
}
// 获取模块信息
export const getMouldInfoList = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getMouldInfoList',
    data: Qs.stringify(data)
  })
}

// 获取分类信息
export const getEachTypeDetailList = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getEachTypeDetailList',
    params,
    data: Qs.stringify(data)
  })
}

// 添加学历信息
export const addEducateInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addEducateInfo',
    data: Qs.stringify(data)
  })
}
// 添加学历信息草稿箱
export const addEducateInfoDrafts = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/drafts/addEducateInfo',
    data: Qs.stringify(data)
  })
}
// 添加年度绩效
export const addYearEffect = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addYearEffect',
    data: Qs.stringify(data)
  })
}
// 添加专业技术资格信息
export const addProTecInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addProTecInfo',
    data: Qs.stringify(data)
  })
}
// 添加技能等级信息
export const addSkillLevelInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addSkillLevelInfo',
    data: Qs.stringify(data)
  })
}
// 添加专家人才称号信息
export const addExpertTitleInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addExpertTitleInfo',
    data: Qs.stringify(data)
  })
}
// 添加学术成果
export const addAcadeAchiveInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addAcadeAchiveInfo',
    data
  })
}
// 添加制度标准
export const addStandInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addStandInfo',
    data
  })
}
// 添加专利
export const addPatentInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addPatentInfo',
    data
  })
}
// 添加技艺革新信息
export const addTecInnovInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addTecInnovInfo',
    data
  })
}
// 添加竞赛考试
export const addContestInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addContestInfo',
    data: Qs.stringify(data)
  })
}
// 添加科技及管理、创新成果
export const addTecManInnov = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addTecManInnov',
    data
  })
}
// 添加个人荣誉信息
export const addHonorInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addHonorInfo',
    data: Qs.stringify(data)
  })
}
// 添加工作经历
export const addWorkExpInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addWorkExpInfo',
    data: Qs.stringify(data)
  })
}
// 添加项目、课题、成果
export const addProjAchieveInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addProjAchieveInfo',
    data
  })
}
// 添加继续教育经历、培训经历、授课经历
export const addContiStudyInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addContiStudyInfo',
    data: Qs.stringify(data)
  })
}
// 添加导师带徒
export const addSdtTutorPrentInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addSdtTutorPrentInfo',
    data
  })
}
// 添加挂职轮岗
export const addRotationInfo = (data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/addRotationInfo',
    data
  })
}
// 获取个人基本信息
export const getBaseInfoByErpNo = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getBaseInfoByErpNo',
    params,
    data
  })
}
// 获取年度绩效
export const yearGrade = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageYearEffect',
    params,
    data
  })
}
// 获取学历信息
export const educationPage = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageEducateInfo',
    params,
    data
  })
}
// 查询学术成果信息
export const academic = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageAcadeAchiveInfo',
    params,
    data
  })
}
// 查询制度标准信息 getPageStandInfoInfo
export const systemStandard = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageStandInfoInfo',
    params,
    data
  })
}
// 查询专利信息getPagePatentInfo
export const copyright = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPagePatentInfo',
    params,
    data
  })
}
// 查询技术革新信息getPageTecInnovInfo
export const artistry = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageTecInnovInfo',
    params,
    data
  })
}
// 查询竞赛信息getPageContestInfo
export const competitionPage = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageContestInfo',
    params,
    data
  })
}
// 查询技术管理群众创新信息getPageTecManInnov
export const sciencePage = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageTecManInnov',
    params,
    data
  })
}
// 查询个人荣誉信息getPageHonorInfo
export const honorPage = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageHonorInfo',
    params,
    data
  })
}
// 查询工作经历信息getPageWorkExp
export const workHistory = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageWorkExp',
    params,
    data
  })
}
// 查询培训授课信息getPageContiStudyInfo
export const trainingRecord = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageContiStudyInfo',
    params,
    data
  })
}
// 查询导师带徒信息getPageSdtTutorPrentInfo
export const beltPrentice = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageSdtTutorPrentInfo',
    params,
    data
  })
}
// 查询项目课题成果信息getPageProjAchieveInfo
export const projectTemplate = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageProjAchieveInfo',
    params,
    data
  })
}
// getPageProTecInfo   专业技术资格信息
export const professionalSkill = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageProTecInfo',
    params,
    data
  })
}
// getPageSkillLevelInfo  技能等级信息
export const skillLevel = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageSkillLevelInfo',
    params,
    data
  })
}
// getPageExpertTitleInfo 专家人才称号
export const titleInformation = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageExpertTitleInfo',
    params,
    data
  })
}
// getPageExpertTitleInfo 挂职轮岗
export const guaZhi = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageRotationInfo',
    params,
    data
  })
}

// 导出个人信息
export const exportWord = (params) => {
  return request({
    url: '/hr-xc-human-resources-perform-manage/exportWord/exportWord',
    params,
    responseType: 'blob'
  })
}

// 年度绩效是否可以编辑
export const yearGradeEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyYearEffectById',
    params,
    data
  })
}
// 学历是否可以编辑
export const educationPageEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyEducateInfoById',
    params,
    data
  })
}
// 专业技术资格是否可以编辑
export const professionalSkillEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyProTecInfoById',
    params,
    data
  })
}
// 技能等级是否可以编辑
export const skillLevelEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadySkillLevelInfoById',
    params,
    data
  })
}
// 专家人才是否可以编辑
export const titleInformationEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyExpertTitleInfoById',
    params,
    data
  })
}
// 学术成果是否可以编辑
export const academicEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyAcadeAchiveInfoById',
    params,
    data
  })
}
// 制度标准是否可以编辑
export const systemStandardEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyStandInfoById',
    params,
    data
  })
}
// 专利是否可以编辑
export const copyrightEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyPatentInfoById',
    params,
    data
  })
}
// 技艺革新是否可以编辑
export const artistryEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyTecInnovInfoById',
    params,
    data
  })
}
// 竞赛考试是否可以编辑
export const competitionPageEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyContestInfoById',
    params,
    data
  })
}
// 科技创新管理是否可以编辑
export const sciencePageEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyTecManInnovById',
    params,
    data
  })
}
// 个人荣誉是否可以编辑
export const honorPageEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyHonorInfoById',
    params,
    data
  })
}
// 工作经历是否可以编辑
export const workHistoryEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyWorkExpInfoById',
    params,
    data
  })
}
// 项目课题成果是否可以编辑
export const projectTemplateEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyProjAchieveInfoById',
    params,
    data
  })
}
// 培训及授课是否可以编辑
export const trainingRecordEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyContiStudyInfoById',
    params,
    data
  })
}
// 导师带徒是否可以编辑
export const beltPrenticeEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadySdtTutorPrentInfoById',
    params,
    data
  })
}
// 挂职轮岗是否可以编辑
export const guaZhiEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyRotationInfoById',
    params,
    data
  })
}

// 获取徒弟奖项
export const getPrizesByErpNoAndTime = (params) => {
  return request({
    url: `/hr-xc-human-resources-perform-manage/prize/getPrizesByErpNoAndTime`,
    params
  })
}
// 下载个人简历
export const exportUserInfoWord = (params) => {
  return request({
    url: `/hr-xc-human-resources-perform-manage/exportWord/exportUserInfoWord`,
    params
  })
}
// 完整度
export const getCompletion = (params) => {
  return request({
    url: `/hr-xc-human-resources-perform-manage/drafts/integrityAnalysis`,
    params
  })
}

// 根据人资编号获取个人岗位方向选项
export const getFuturePostByErpNo = (params) => {
  return request({
    url: `/hr-xc-human-resources-perform-manage/userinfo/getFuturePostByErpNo`,
    params
  })
}

// 添加员工成长计划
export const addGrowthPlan = (data) => {
  return request({
    method: 'post',
    url: `/hr-xc-human-resources-perform-manage/userinfo/addGrowthPlan`,
    data
  })
}

// 编辑员工成长计划
export const updateGrowthPlan = (data) => {
  return request({
    method: 'post',
    url: `/hr-xc-human-resources-perform-manage/userinfo/updateGrowthPlan`,
    data
  })
}
// 分页查找个人员工成长计划列表
export const postGrow = (params, data) => {
  return request({
    url: `/hr-xc-human-resources-perform-manage/userinfo/getPersonalPageGrowthPlanByErpNo`,
    params: {
      ...params,
      ...data
    }
  })
}

// 分页查找员工流动列表
export const employeeFlow = (params, data) => {
  return request({
    method: 'post',
    url: `/hr-xc-human-resources-perform-manage/userinfo/getPageEmployeeMobility`,
    params,
    data
  })
}
// 新增员工流动列表
export const addEmployeeMobility = data => {
  return request({
    method: 'post',
    url: `/hr-xc-human-resources-perform-manage/userinfo/addEmployeeMobility`,
    data
  })
}
// 更新员工流动列表
export const updateEmployeeMobility = data => {
  return request({
    method: 'post',
    url: `/hr-xc-human-resources-perform-manage/userinfo/updateEmployeeMobility`,
    data
  })
}

// 员工流动是否可以编辑
export const employeeFlowEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getReadyEmployeeMobilityById',
    params,
    data
  })
}

// getPageExpertTitleInfo 技术标准
export const tecStandard = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getPageTecStandardInfo',
    params,
    data
  })
}

// 新增技术标准列表
export const addTecStandard = data => {
  return request({
    method: 'post',
    url: `/hr-xc-human-resources-perform-manage/userinfo/addTecStandardInfo`,
    data
  })
}
// 更新技术标准列表
export const updateTecStandard = data => {
  return request({
    method: 'post',
    url: `/hr-xc-human-resources-perform-manage/userinfo/updateTecStandardInfo`,
    data
  })
}

// 技术标准是否可以编辑
export const tecStandardEdit = (params, data) => {
  return request({
    method: 'post',
    url: '/hr-xc-human-resources-perform-manage/userinfo/getTecStandardInfoById',
    params,
    data
  })
}
export default {
  addBaseInfo, addYearEffect, getMouldInfoList, getEachTypeDetailList,
  addEducateInfo, addProTecInfo, addSkillLevelInfo, addExpertTitleInfo,
  addAcadeAchiveInfo, addStandInfo, addPatentInfo, addTecInnovInfo, addContestInfo,
  addTecManInnov, addHonorInfo, addWorkExpInfo, addProjAchieveInfo, addContiStudyInfo,
  addSdtTutorPrentInfo, addRotationInfo, getBaseInfoByErpNo, exportWord,
  yearGrade, educationPage, professionalSkill, skillLevel, titleInformation, academic,
  systemStandard, copyright, artistry, competitionPage, sciencePage, honorPage, workHistory,
  projectTemplate, trainingRecord, beltPrentice, guaZhi,
  yearGradeEdit, educationPageEdit, professionalSkillEdit, skillLevelEdit, titleInformationEdit,
  academicEdit, systemStandardEdit, copyrightEdit, artistryEdit, competitionPageEdit, sciencePageEdit,
  honorPageEdit, workHistoryEdit, projectTemplateEdit, trainingRecordEdit, beltPrenticeEdit, guaZhiEdit, getPrizesByErpNoAndTime,
  exportUserInfoWord, addEducateInfoDrafts, getCompletion,
  getFuturePostByErpNo, addGrowthPlan, updateGrowthPlan, postGrow, employeeFlow, addEmployeeMobility, updateEmployeeMobility,
  employeeFlowEdit, tecStandard, tecStandardEdit, addTecStandard, updateTecStandard
}
